package com.struts.web.corpor.manage.infomanage;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;

import com.base.Constants;
import com.lg.system.CLGAction;
import com.struts.deal.corpor.manage.infomanage.InfoDeal;

public class ViewCorporInfoAction extends CLGAction {

	public ActionForward execute(ActionMapping actionMapping,
            ActionForm actionForm,
            HttpServletRequest request,
            HttpServletResponse response) throws Exception {
		ViewCorporInfoForm aWebForm = (ViewCorporInfoForm)actionForm;
		boolean result = false;
		ActionMessages msgs = new ActionMessages();
		result=InfoDeal.viewCorporInfo(request, response, aWebForm);
		if(result==false){
			msgs.add("commonMsgs",new ActionMessage(Constants.NOTEXIST_OR_DEL));
			saveErrors(request,msgs);
			return actionMapping.findForward("fail");
		}else{
			return actionMapping.getInputForward();
		}
		
		
	 }
	
}
